import { DataSource } from 'typeorm';
import { Yingpingfankui } from './entities/yingpingfankui.entity';

export const yingpingfankuiProviders = [
  {
    provide: 'YINGPINGFANKUI_REPOSITORY', // 自定义的提供者令牌
    useFactory: (dataSource: DataSource) =>
      dataSource.getRepository(Yingpingfankui),
    inject: ['DATABASE_CONNECTION'], // 注入数据库连接
  },
];
